<template>
	<view class="content">
		<view v-for="(item,index) in list" :key="index" :class="index> 0 ?'content-item':''">
			<!-- 第二块 -->
			<view class="del" v-if="index>0">
				<text>新增隐患{{index+1}}</text>
				<view class="splice" @tap="delitem(index)">
					<u-icon name="minus-circle" color="#C72B14"></u-icon>
					<text>删除</text>
				</view>
			</view>
			<view class="ipts">
				<!-- 隐患来源 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患来源</span>
					</view>
					<view class="place-class" @tap="yhly(index)">
						<input type="text" disabled v-model="item.yhsource" placeholder="请选择" />
						<u-icon size="32" name="arrow-right"></u-icon>
						<u-select v-model="item.show" :list="optionsData" @confirm="confirm($event,index)">
						</u-select>
					</view>
				</view>

				<!-- 隐患类别 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患类别</span>
					</view>
					<view class="place-class" @tap="yhtype(index)">
						<input type="text" disabled v-model="item.yhtype" placeholder-style="font-size:28rpx"
							placeholder="请选择" />
						<u-icon size="32" name="arrow-right"></u-icon>
						<u-select value-name="id" v-model="item.show1"
							:list="item.value == 2 ? item.optionsOut:item.options" @confirm="confirm1($event,index)">
						</u-select>
					</view>

				</view>

				<!-- 隐患类型 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患类型</span>
					</view>
					<view class="place-class" @tap="yhtype1(index)">
						<input type="text" disabled v-model="item.yhtype1" placeholder-style="font-size:28rpx"
							placeholder="请选择" />
						<u-icon size="32" name="arrow-right"></u-icon>
						<u-select value-name="id" v-model="item.show2"
							:list="item.value == 2?item.options1Out:item.options1" @confirm="confirm2($event,index)">
						</u-select>
					</view>
				</view>

				<!-- 隐患分级 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患分级</span>
					</view>
					<view class="place-class" @tap="yhleavel(index)">
						<input type="text" disabled v-model="item.yhlevel" placeholder-style="font-size:28rpx"
							placeholder="请选择" />
						<u-icon size="32" name="arrow-right"></u-icon>
						<u-select value-name="id" v-model="item.show3" :list="classificationb"
							@confirm="confirm3($event,index)"></u-select>
					</view>
				</view>

				<!-- 隐患村庄 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患村庄</span>
					</view>
					<view class="place-class" @tap="yhvillage(index)">
						<input type="text" disabled v-model="item.yhvillage.name" placeholder="请选择" />
						<u-icon size="32" name="arrow-right"></u-icon>
						<u-select v-model="item.show5" mode="mutil-column-auto" :list="villageName" @confirm="confirm5($event,index)">
						</u-select>
					</view>
				</view>

				<!-- 隐患地址 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患地址</span>
					</view>
					<input v-model="item.selecAdress" type="text" placeholder-style="font-size:28rpx"
						placeholder="请输入隐患地址" />
					<image src="/static/qxsb.png" mode="" style="width: 40rpx; height: 40rpx;" @click="tapMap(index)">
					</image>
				</view>

				<!-- 隐患描述 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患描述</span>
					</view>
					<input v-model="item.selecText" type="text" placeholder-style="font-size:28rpx"
						placeholder="请输入该隐患的描述" />
				</view>

				<!-- 隐患照片 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>整改期限</span>
					</view>
					<view class="danger-img-box">
						<view class="place-class" v-if="item.optionsTimeText != '其他'" @tap="limit(index)">
							<input type="text" disabled v-model="item.optionsTimeText"
								placeholder-style="font-size:28rpx" placeholder="请选择" />
							<u-icon size="32" name="arrow-right"></u-icon>
							<u-select value-name="id" v-model="item.show4" :list="optionsDate"
								@confirm="confirm4($event,index)"></u-select>
						</view>
						<input v-else style="font-size: 28rpx;color: #99999;text-align: right;" type="number" v-else
							v-model="item.jieDate" placeholder="请输入截止如期" placeholder-style="font-size:28rpx" />
					</view>
				</view>

				<!-- 隐患照片 -->
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患照片</span>
					</view>
					<view class="addform-items">
						<view class="" style="position: relative;height: 60rpx;" v-for="(i,ind) in item.img">
							<image class="form-img" :src="i" :key="ind" @tap="seeimg('img',index,ind)"></image>
							<image class="delet" src="/static/delet.png" mode="" @tap="deletImg('img',index,ind)">
							</image>
						</view>
						<view class="add" @tap="chooseImage('img',index)">
							<u-icon name="plus" color="#999999" size="28"></u-icon>
						</view>
					</view>
				</view>
			</view>
			<!-- 上次安检时间 -->
			<view class="ipts">
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>隐患是否持续跟踪</span>
					</view>
					<view class="danger-img-box">
						<switch :checked="item.isChecked" @change="item.isChecked = !item.isChecked"
							style="transform:scale(0.7)" />
					</view>
				</view>
			</view>
		</view>

		<!-- 添加其他隐患 -->
		<view class="hidden" @tap="addlist">+添加其他隐患</view>

		<view class="butn" @click="submit">立即上报</view>
		<cpimg ref="cpimg" @result="cpimgOk" @err="cpimgErr" :number="1" :fixOrientation="true" :size="500"
			:maxWidth="800" :ql="0.7" type="url" />


	</view>
</template>

<script>
	import QQMapWX from "@/common/qqmap-wx-jssdk";
	import cpimg from "@/components/cpimg/cpimg.vue"
	import easySelect from '@/components/easy-select/easy-select'
	import amap from '@/common/amap-wx.js'
	export default {
		components: {
			easySelect,
			cpimg
		},

		data() {
			return {
				amapPlugin: null,
				key: '25d8a43c8ee55f7c0e6dfb815fdff544',
				urlimg: 'https://trq.wqzsgas.com',
				showR: true,
				username: '',
				password: '',
				// array: ['安装工','检测工','维修工'],
				index: 0,
				userinfo: {},
				value: '', //搜索关键词
				installList: [], //安装列表
				dosearch: false,
				showAcount: false,
				page: 1,
				options: [],
				optionsOut: [],
				options1: [],
				options1Out: [],
				token: '',
				// 开关状态
				checkeds: false,
				// 开关禁用
				disabled: true,
				// 上传图片路径
				fileImg: [],
				classification: '', //分级
				// 隐患描述
				selecText: '',
				switchFlag: false,
				classificationb: [],
				villageName: [],
				optionsDate: [],
				userId: '',
				equipment_type: '',
				type: '',
				textNumber: 0,
				selfs: [{
						id: 1,
						label: '正常'
					},
					{
						id: 2,
						label: '异常'
					}
				],
				// 隐患来源
				optionsData: [{
						value: 2,
						label: '户外隐患'
					},
					{
						value: 1,
						label: '户内隐患'
					}
				],
				selfsText: '正常',
				searchIpt: '',
				long: '', //地理位置
				lat: '', //地理位置
				type_id: 2, //来源类型的id
				hunei_id: '', //户内id
				typeName: "",
				checkId: "",
				task_id: "",
				list: [{
					yhsource: '',
					value: '',
					yhtype: '',
					yhtype1: '',
					yhtype1Value: '',
					yhlevel: '',
					yhvillage: {},
					selecAdress: '',
					selecText: '',
					optionsTimeText: '',
					jieDate: '',
					img: [],
					tracking: 2,
					isChecked: false,
					show: false, //隐患来源
					show1: false,
					show2: false,
					show3: false,
					show4: false,
					show5: false,
					options: [],
					optionsOut: [],
					options1: [],
					options1Out: [],
					long: '',
					lat: ''
				}],
				imgs: '',
				imgindex: '',
				report: true,
				status: 0,
			};
		},
		watch: {
			img: function(b, d) {
				if (b != null) {
					this.switchFlag = true
				}
			},
			switchFlag: function(v, a) {
				if (v == true) {
					this.disabled = false
				}
			}
		},
		onLoad(e) {
			if (e.status) {
				this.status = e.status
				
			}
			uni.getStorage({
				key: 'token'
			}).then(da => {
				this.token = da[1].data
				this.getexteData()
				this.getList()
				this.getMap(0)
				this.getDangerGradeList()
				this.getHamletlist()
			})
			this.amapPlugin = new amap.AMapWX({
				key: this.key
			});
			
			wx.enableAlertBeforeUnload({
			    message: "是否返回上一页",
			   });
			
		},
		//下拉刷新
		onPullDownRefresh() {
			this.page = 1
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 500);
			// this.getInstallDetail()
		},
		onReachBottom() {
			this.page++
			// this.getInstallDetail()
		},
		methods: {
			yhly(index) {
				this.list[index].show = !this.list[index].show
			},
			yhtype(index) {
				if (!this.list[index].value) {
					return this.$showToast('请选择隐患来源')
				}
				this.list[index].show1 = !this.list[index].show1
			},
			yhtype1(index) {
				if (!this.list[index].yhtype) {
					return this.$showToast('请选择隐患类别')
				}
				this.list[index].show2 = !this.list[index].show2
			},
			yhleavel(index) {
				this.list[index].show3 = !this.list[index].show3
			},
			yhvillage(index) {
				this.list[index].show5 = !this.list[index].show5
			},
			limit(index) {
				this.list[index].show4 = !this.list[index].show4
			},
			confirm(e, i) {
				this.list[i].yhsource = e[0].label
				this.list[i].value = e[0].value
				this.list[i].yhtype = ''
				this.list[i].yhtype1 = ''
				this.list[i].yhtype1Value = ''
			},
			confirm1(e, i) {
				this.list[i].yhtype = e[0].label
				if (this.list[i].value == 1) {
					this.list[i].yhtype1 = ''
					this.options1 = []
					this.indoortype(e[0].value)
				}
			},
			confirm2(e, i) {
				this.list[i].yhtype1 = e[0].label
				this.list[i].yhtype1Value = e[0].value
			},
			confirm3(e, i) {

				this.list[i].yhlevel = e[0].label
			},

			confirm4(e, i) {
				this.list[i].optionsTimeText = e[0].label
			},
			confirm5(e, i) {
				this.list[i].yhvillage.name =`${e[0].label} - ${e[1].label}`
				this.list[i].yhvillage.value =e[1].value
			},
			addlist() {
				this.list.push({
					yhsource: '',
					value: '',
					yhtype: '',
					yhtype1: '',
					yhtype1Value: '',
					yhlevel: '',
					yhvillage: {},
					selecAdress: '',
					selecText: '',
					optionsTimeText: '',
					jieDate: '',
					img: [],
					tracking: 2,
					isChecked: false,
					show: false, //隐患来源
					show1: false,
					show2: false,
					show3: false,
					show4: false,
					show5: false,
					options: this.options,
					optionsOut: this.optionsOut,
					options1: this.options1,
					options1Out: this.options1Out,
					long: '',
					lat: ''
				})
				this.tapMap(this.list.length - 1)

			},
			// 村庄
			getHamletlist() {
				let _this = this

				uni.request({
					url: this.$api + 'user/towlist',
					method: 'POST',
					data: {
						token: this.token
					},
					success: (res) => {
						if (res.data.code == 1) {
							_this.villageName = res.data.data
						}

					}
				})
			},
			getDangerGradeList() {
				let _this = this
				uni.request({
					url: this.$url + 'common.danger/getDangerGradeList',
					method: 'GET',
					data: {
						token: this.token
					},
					success: (res) => {
						if (res.data.code == 1) {
							_this.classificationb = res.data.data
						}
					}
				})
			},
			updetail(index) {
				this.img.splice(index, 1)
			},
			//图片预览
			seeimg(imgs, index, ind) {
				let _this = this
				uni.previewImage({
					urls: _this.list[index].img,
					current: ind,
					loop: true
				})
			},
			deletImg(imgs, index, ind) {
				this.list[index][imgs].splice(ind, 1)
			},
			delitem(index) {
				uni.showModal({
					content: '是否要删除新增隐患' + (index + 1),
					success: (res) => {
						if (res.confirm) {
							this.list.splice(index, 1)
						}
					}
				})
			},
			//选择图片 
			chooseImage(imgs, index) {
				this.imgs = imgs
				this.imgindex = index;
				console.log(this.imgindex)
				var that = this;
				if (this.list[index][imgs].length < 3) {
					that.$refs.cpimg._changImg()
				} else {
					uni.showToast({
						icon: 'none',
						title: '上传已达到限制'
					})
				}

			},

			cpimgOk(file) {
				let that = this
				uni.showLoading({
					title: '上传中...'
				})
				// 上传图片
				uni.uploadFile({
					// url:'https://trq.aoaojiao.online/api/common/upload',
					url: that.$fileImg + '/common/upload',
					filePath: file[0],
					name: 'file',
					formData: {
						token: that.token
					},
					success(res1) {
						let dataPath = JSON.parse(res1.data)
						if (dataPath.code == 1) {
							that.list[that.imgindex].img.push(that.urlimg + dataPath.data.url)
							console.log(that.list)
						}

						uni.hideLoading()
					},
					fail: () => {
						uni.hideLoading()
						uni.showToast({
							title: '上传失败'
						})
					}
				});

			},
			cpimgErr(e) {
				uni.showToast({
					title: '上传失败',
					icon: 'none'
				})
				console.log(e)
			},

			tapMap(index) {
				this.getMap(index)
			},
			//获取地理位置
			getMap(index) {
				var that = this;
				var qqmapsdk;
				this.amapPlugin.getRegeo({
					success: (data) => {
						// console.log(data, '经纬度')
						// that.selecAdress = data[0].regeocodeData.formatted_address;
						// that.list[index].selecAdress = data[0].regeocodeData.formatted_address;
						uni.hideLoading();
						that.long = data[0].longitude
						that.lat = data[0].latitude
						that.list[index].long = data[0].longitude
						that.list[index].lat = data[0].latitude
						qqmapsdk = new QQMapWX({
							key: "662BZ-2EAR6-M34S7-M4NPO-HFV3F-QEBTV" //自己申请的key
						});
						qqmapsdk.reverseGeocoder({
							location: {
								latitude: that.lat,
								longitude: that.long
							},
							success(addressRes) {
								console.log(addressRes, '0000');
								that.selecAdress = addressRes.result.address + addressRes.result
									.address_reference.landmark_l2.title;
								that.list[index].selecAdress = addressRes.result.address + addressRes
									.result.address_reference.landmark_l2.title;
							},
							fail(res) {
								console.log(res, '错误');
							}
						});
					}
				});
			},
			textChange(e) {
				if (e.detail.cursor >= 200) {
					uni.showToast({
						title: '最多可以输入200个字',
						icon: 'none'
					})
				}
				this.textNumber = e.detail.cursor
			},
			async getList() {
				let that = this
				const res = await that.$request.request({
					url: '/common/danger_handel_days',
					method: 'POST',
					data: {
						token: that.token
					}
				})
				that.optionsDate = res.data.data
				console.log(that.optionsDate)
			},

			getexteData() {
				let that = this
				that.$request.request({
					url: '/danger/get_danger_source_out', //户外
					method: 'POST',
					data: {
						token: that.token
					}
				}).then(res => {
					that.optionsOut = res.data.data
					that.list[0].optionsOut = res.data.data
					console.log('户外', that.optionsOut)
				})
				that.$request.request({
					url: '/danger/get_danger_source', //户内
					method: 'POST',
					data: {
						token: that.token
					}
				}).then(res => {
					that.options = res.data.data
					that.list[0].options = res.data.data
					console.log('户内', that.options)

				})
				//隐患类型
				that.$request.request({
					url: '/danger/get_danger_classify_out', //户外
					method: 'POST',
					data: {
						token: that.token
					}
				}).then(res => {
					that.options1Out = res.data.data
					that.list[0].options1Out = res.data.data
				})
			},

			indoortype(id) {
				var that = this
				that.$request.request({
					url: '/danger/get_danger_classify', //户内
					method: 'POST',
					data: {
						token: that.token,
						source_id: id
					}
				}).then(res => {
					that.options1 = res.data.data
					that.list[0].options1 = res.data.data
					console.log(that.list[0], '0000');
				})
			},
			// 立即上报
			submit() {
				if (this.report) {
					this.report = false
					setTimeout(() => {
						this.report = true
					}, 2000)
					var arr = []
					var that = this
					for (let i = 0; i < this.list.length; i++) {
						if (!this.list[i].yhsource) return this.$showToast('请选择隐患来源')
						if (!this.list[i].yhtype) return this.$showToast('请选择隐患类别')
						if (!this.list[i].yhtype1) return this.$showToast('请选择隐患类型')
						if (!this.list[i].yhlevel) return this.$showToast('请选择隐患分级')
						if (!this.list[i].yhvillage) return this.$showToast('请选择隐患村庄')

						if (!this.list[i].selecAdress) return this.$showToast('请输入隐患地址')
						if (!this.list[i].selecText) return this.$showToast('请输入该隐患的描述')
						if (!this.list[i].optionsTimeText && !this.list[i].jieDate) return this.$showToast('请输入整改期限')
						if (this.list[i].img.length == 0) return this.$showToast('请上传隐患照片')
						if (this.list[i].isChecked) {
							this.list[i].tracking = 1
						} else {
							this.list[i].tracking = 2
						}
						// console.log('提交隐患: yhvillag.value',this.list[i].yhvillage.value);
					arr.push({
						address: this.list[i].selecAdress,
						description: this.list[i].selecText,
						picture_1: this.list[i].img,
						deadline_time: this.list[i].jieDate || this.list[i].optionsTimeText == '立即' ? 0 : this
							.list[i].optionsTimeText,
						source_type: this.list[i].value,
						source: this.list[i].yhsource,
						classify: this.list[i].yhtype,
						type: this.list[i].yhtype1Value,
						grade: this.list[i].yhlevel,
						s_finish: this.list[i].tracking,
						long: this.long,
						lat: this.lat,
						village_id: this.list[i].yhvillage.value,
					})
				}

				that.$request.request({
					url: '/danger/danger_upload1',
					method: 'POST',
					header: {
						token: that.token,
					},
					data: {
						dangerData: arr
					}
				}).then(res => {
					that.$showToast(res.data.msg)
					if (res.data.code == 1) {
						console.log('this.status0000000000',this.status);
						if (that.status == '1'||that.status == 0) {
							console.log('this.status111111111',this.status);
							let ids = []
							res.data.data.forEach((item) => {
								ids.push(item.id)
							})
							let pages = getCurrentPages()
							let nowPage = pages[pages.length - 1]
							let prevPage = pages[pages.length - 2]
							prevPage.$vm.sercode = ids
							setTimeout(() => {
								uni.navigateBack({
									delta: 1
								})
							}, 1000)
						} else {
							setTimeout(() => {
								uni.redirectTo({
									url: '/pagesA/danger/danger'
								})
							}, 1000)
						}

					}
				})

			} else {
				this.$showToast('请勿多次点击')
			}
		},
		close() {
			var that = this
			// uni.navigateBack({
			// 	delta:1
			// })
			uni.navigateTo({
				url: '/pages/install_worker/rithcheck/ritycheck?socont=' + this.searchIpt
			})
			// uni.switchTab({
			// 	url:'../index/index'
			// })
		},
		showRecord() {
			this.showR = !this.showR
		},
		searchFocus() {
			this.showAcount = false
		},
		infoClick() {
			this.showAcount = !this.showAcount
		},
		// 退出登录
		logOut() {
			uni.clearStorage({
				key: 'logininfo',
				success: () => {
					this.showAcount = false
					uni.redirectTo({
						url: '../../login/login'
					})
				}
			})
		},
		// 跳转至记录页面
		toJiLu() {
			uni.navigateTo({
				url: './jilu'
			})
		},
		// 跳转用户信息页面
		toCaiLiao(id) {
			uni.navigateTo({
				url: '../userinfo/uninstall?id=' + id
			})
		},
		// 点击获取安装数据
		searchUser(val) {
			// this.getInstallDetail ()
			this.dosearch = true
			uni.navigateTo({
				url: '../query/query?key=' + val
			})
		},
	},

	}
</script>

<style lang="scss" scoped>
	.content-item {
		margin-top: 30rpx;
	}

	.del {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
		background: #FFFFFF;
		font-size: 32rpx;
		height: 100rpx;
		border-bottom: 1rpx solid #DDDDDD;

		.splice {
			color: #C72B14;
			display: flex;
			align-items: center;
		}
	}

	.addform-items {
		display: flex;
		align-items: center;

		.delet {
			position: absolute;
			top: -8rpx;
			right: 4rpx;
			width: 28rpx;
			height: 28rpx;
			z-index: 10;
		}

		.form-img {
			width: 60rpx;
			height: 60rpx;
			margin-right: 20rpx;
		}

		.add {
			width: 60rpx;
			height: 60rpx;
			border: 1rpx solid #DDDDDD;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}

	.content {
		position: relative;
		padding-bottom: 140rpx;
		background: #F1F1F1;
		padding-top: 30rpx;
	}

	.danger-img {
		position: relative;

		.updeletes {
			position: absolute;
			top: -20rpx;
			right: -20rpx;
			width: 40rpx;
			height: 40rpx;
			z-index: 88;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	// header
	.header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 30rpx 30rpx;
		background-color: #fff;

		.header-left {
			display: flex;
			align-items: center;
			font-size: 32rpx;
			font-weight: 500;
			color: #333;

			image {
				width: 24rpx;
				height: 24rpx;
				margin-right: 20rpx;
			}
		}

		.header-right {
			display: flex;
			align-items: center;
			font-size: 28rpx;
			color: #333;

			image {
				width: 52rpx;
				height: 52rpx;
				margin-right: 10rpx;
			}
		}
	}

	.ipts {
		background-color: #fff;
	}

	.info-item {
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
		// height: 72rpx;
		width: 100%;
		padding: 0 30rpx;
		height: 100rpx;
		line-height: 100rpx;
		background-color: #fff;
		border-bottom: 1rpx solid #DDDDDD;
		font-size: 28rpx;
		color: #333;

		input {
			flex: 1;
			text-align: right;
			padding-right: 20rpx;
			padding-left: 20rpx;
		}

		.dot {
			width: 8rpx;
			height: 8rpx;
			background-color: #003690;
			border-radius: 50%;
			margin-right: 10rpx;
		}

		.danger-img {
			position: relative;
			width: 75rpx;
			height: 75rpx;
			border: 2rpx dashed #eee;
			margin-right: 10rpx;
			text-align: center;

			image {
				width: 80%;
				height: 80%;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
				opacity: 1;
			}
		}

		.danger-img-box {
			display: flex;
		}

		.info-item-left {
			display: flex;
			align-items: center;
			font-size: 32rpx;
		}
	}

	.hengxian {
		width: 700rpx;
		height: 2rpx;
		background-color: #eee;
		margin: 20rpx auto;
	}

	.hidden {
		background: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 24rpx;
		padding: 32rpx 0;
	}

	.place-class {
		width: 400rpx;
		font-size: 28rpx;
		color: #999;
		text-align: end;
		display: flex;
		align-items: center;
	}

	.btn {
		width: 646rpx;
		height: 80rpx;
		margin: 74rpx auto;
		text-align: center;
		line-height: 80rpx;
		border-radius: 40rpx;
		background-image: linear-gradient(to bottom, #2366D5, #001B48);
		font-size: 32rpx;
		color: #E5EFFE;
	}

	.btns {
		position: fixed;
		bottom: 0;
		display: flex;
		width: 100%;

		.btn1 {
			width: 50%;
			height: 96rpx;
			line-height: 96rpx;
			text-align: center;
			font-size: 28rpx;
		}

		.consel {
			background-color: #e9e9e9;
			color: #777;
		}

		.save {
			background-color: #003690;
			color: #fff;
		}
	}

	.btn:active {
		background: rgba(0, 0, 0, 0.4);
	}

	.record {
		display: flex;
		align-items: center;
		color: #003690;
		font-size: 32rpx;
		margin-top: 20rpx;

		image {
			width: 32rpx;
			height: 32rpx;
			margin: 0 20rpx 0 30rpx;
		}

		span {
			font-weight: 700;
		}
	}

	.record-item {
		display: flex;
		justify-content: space-between;
		padding: 10rpx 30rpx;
		border-bottom: 2rpx solid #eee;

		.record-item-left {
			display: flex;
			align-items: center;

			.shu {
				width: 8rpx;
				height: 28rpx;
				background-color: #003690;
				border-radius: 8rpx;
			}

			.title {
				font-size: 32rpx;
				color: #333;
				font-weight: 500;
				margin: 0 10rpx;
			}

			.time {
				font-size: 28rpx;
				color: #777;
			}
		}

		.record-item-right {
			display: flex;
			align-items: center;

			.dianhua {
				width: 28rpx;
				height: 28rpx;
			}

			.zhankai {
				width: 36rpx;
				height: 36rpx;
			}

			.title {
				font-size: 32rpx;
				color: #555;
				font-weight: 500;
				margin: 0 10rpx;
			}
		}
	}

	.supplement {
		margin: 20rpx 24rpx;
		background-color: #fff;
		position: relative;
		overflow: hidden;

		.explain {
			.textArea {
				min-height: 142rpx;
				padding: 14rpx 30rpx;
				font-size: 32rpx;
				text-align: left;
				color: rgba(187, 187, 187, 0.84);
			}
		}

		.suppBottom {
			.danger-img {
				position: relative;
				margin-left: 50rpx;
				margin-bottom: 0rpx;
				width: 68rpx;
				height: 68rpx;
				float: left;

				image {
					width: 36rpx;
					height: 36rpx;
					position: absolute;
					left: 50%;
					top: 50%;
					transform: translate(-50%, -50%);
				}
			}

			.num {
				float: right;
				margin-right: 26rpx;
			}
		}
	}
</style>
